package com.leyou.mapper;

import com.leyou.item.entity.Spu;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author xiuer 商品持久层
 * @date 2019/6/27 21:57
 */
public interface SpuMapper {
    List<Spu> queryPageSpu(@Param("key") String key,@Param("saleable") Boolean saleable);

    int insertGoodBySpu(Spu spu);
        /*更改商品上下架信息*/
    int updateSaleableBySpuId(@Param("id") Long id, @Param("saleable") Boolean saleable);
    /*根据主键更新spu表信息*/
    int updateSpuByid(Spu spu);
    /*根据spu_id 查询 spu*/
    Spu querySpuById(@Param("id")Long id);
}
